package com.black.cat.jvm.rtda.heap.constantpool;

import com.black.cat.jvm.rtda.heap.methodarea.JClass;

/**
 * @Author blackcat
 * @create 2021/8/14 13:28
 * @version: 1.0
 * @description:4种类型的符号引用的共性类
 */
public class SymRef {

    public RunTimeConstantPool runTimeConstantPool;
    public String className;
    public JClass clazz;

    public JClass resolvedClass() {
        if (null != this.clazz) return this.clazz;
        JClass d = this.runTimeConstantPool.getClazz();
        JClass c = d.loader.loadClass(this.className);;
        this.clazz = c;
        return this.clazz;
    }
}
